package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbOfflineTaskDetailMapper;
import com.ruoyi.system.domain.TbOfflineTaskDetail;
import com.ruoyi.system.service.ITbOfflineTaskDetailService;

/**
 * 离线包虚拟任务明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-03
 */
@Service
public class TbOfflineTaskDetailServiceImpl implements ITbOfflineTaskDetailService 
{
    @Autowired
    private TbOfflineTaskDetailMapper tbOfflineTaskDetailMapper;

    /**
     * 查询离线包虚拟任务明细
     * 
     * @param id 离线包虚拟任务明细主键
     * @return 离线包虚拟任务明细
     */
    @Override
    public TbOfflineTaskDetail selectTbOfflineTaskDetailById(Long id)
    {
        return tbOfflineTaskDetailMapper.selectTbOfflineTaskDetailById(id);
    }

    /**
     * 查询离线包虚拟任务明细列表
     * 
     * @param tbOfflineTaskDetail 离线包虚拟任务明细
     * @return 离线包虚拟任务明细
     */
    @Override
    public List<TbOfflineTaskDetail> selectTbOfflineTaskDetailList(TbOfflineTaskDetail tbOfflineTaskDetail)
    {
        return tbOfflineTaskDetailMapper.selectTbOfflineTaskDetailList(tbOfflineTaskDetail);
    }

    /**
     * 新增离线包虚拟任务明细
     * 
     * @param tbOfflineTaskDetail 离线包虚拟任务明细
     * @return 结果
     */
    @Override
    public int insertTbOfflineTaskDetail(TbOfflineTaskDetail tbOfflineTaskDetail)
    {
        tbOfflineTaskDetail.setCreateTime(DateUtils.getNowDate());
        return tbOfflineTaskDetailMapper.insertTbOfflineTaskDetail(tbOfflineTaskDetail);
    }

    /**
     * 修改离线包虚拟任务明细
     * 
     * @param tbOfflineTaskDetail 离线包虚拟任务明细
     * @return 结果
     */
    @Override
    public int updateTbOfflineTaskDetail(TbOfflineTaskDetail tbOfflineTaskDetail)
    {
        tbOfflineTaskDetail.setUpdateTime(DateUtils.getNowDate());
        return tbOfflineTaskDetailMapper.updateTbOfflineTaskDetail(tbOfflineTaskDetail);
    }

    /**
     * 批量删除离线包虚拟任务明细
     * 
     * @param ids 需要删除的离线包虚拟任务明细主键
     * @return 结果
     */
    @Override
    public int deleteTbOfflineTaskDetailByIds(Long[] ids)
    {
        return tbOfflineTaskDetailMapper.deleteTbOfflineTaskDetailByIds(ids);
    }

    /**
     * 删除离线包虚拟任务明细信息
     * 
     * @param id 离线包虚拟任务明细主键
     * @return 结果
     */
    @Override
    public int deleteTbOfflineTaskDetailById(Long id)
    {
        return tbOfflineTaskDetailMapper.deleteTbOfflineTaskDetailById(id);
    }
}
